package org.codeblue.support.db;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by jl.hu on 2017/4/5.
 */
public class TableColumn {
    private boolean isid;
    private boolean isfk;
    private String name;
    private String type;
    private String desc;
    private boolean isnullable = false;
    private Integer length = 255;

//    private String upperName;

    public boolean isid() {
        return isid;
    }

    public void setIsid(boolean isid) {
        this.isid = isid;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public boolean isnullable() {
        return isnullable;
    }

    public void setIsnullable(boolean isnullable) {
        this.isnullable = isnullable;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isfk() {
        return isfk;
    }

    public void setIsfk(boolean isfk) {
        this.isfk = isfk;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getUpperName() {
        return StringUtils.upperCase(StringUtils.substring(name,0,1))+ StringUtils.substring(name,1);
    }
}
